@extends('PShop::layout')
@push('styles')
<link href="{{asset(config('view.plugin').'/layui/css/layui.css')}}" rel="stylesheet">
<style type="text/css">
    .am-modal-bd{padding:30px 10px;}
    dt{font-weight: normal;}
    .am-checkbox{margin-top: 0;margin-bottom: 0;line-height: inherit;}
</style>
@endpush
@section('content')
    <section class="wapper">
        <div class="base-w">
            <div class="">
                <ol class="am-breadcrumb am-margin-bottom-0 am-padding-top-sm am-padding-bottom-sm">
                    <li><a href="/">首页</a></li>
                    <li><a href="{{route('f_Pc_Order_orderList')}}">订单列表</a></li>
                    <li class="am-active"><a href="#">订单详情</a></li>
                </ol>
            </div>
            <div class="">
                @if($info)

                    <div class="am-panel-hd am-vertical-align am-bg-white">
                        <div class="am-inline-block am-u-sm-8">
                            <span class="am-padding-right">创建时间：{{$info->created_at}}</span>
                            <span>订单编号：{{$info->order_sn}}</span>
                        </div>
                        <div class="am-inline-block  am-u-sm-4">
                            <span>订单状态：{{config('shop.order_status')[$info->status]}}</span><br><br/>
                            @if($info->status >=2)
                                配送方式:<span>{{get_expresses()[$info->express_name]}}</span><br><br/>
                                物流单号:<span>{{$info->express_num}}</span>
                            @endif
                        </div>
                    </div>
                <div class="am-margin-bottom am-bg-white am-padding" id="address-box">

                    <div class="am-g isAddress">
                        <div class="am-u-md-8 am-u-lg-8 am-padding-0" style="border-right: 1px dashed #EEEEEE;">
                            <div class="am-margin-top-sm">
                                <div class="am-padding-bottom-sm">
                                    <span class="am-link-muted">收货人：</span><span id="show-name">{{$info->consignee?? ''}}</span>
                                </div>
                                <div class="am-padding-bottom-sm">
                                    <span class="am-link-muted">联系方式：</span><span id="show-phone">{{$info->phone??''}}</span>
                                </div>
                                <div class="am-padding-bottom-sm">
                                    <span class="am-link-muted">收货地址：</span>
                                    <span id="show-address">{{$info->post_address}}</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                    <div class="am-scrollable-horizontal shopCar-list-data am-bg-white am-padding-left-sm am-padding-right-sm">
                        <table class="am-table am-text-nowrap am-text-center">
                            <thead>
                            <tr>
                                <th>商品信息</th>
                                <th class="am-text-center">规格</th>
                                <th class="am-text-center">单价</th>
                                <th class="am-text-center">数量</th>
                                <th class="am-text-center">小计</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($info->goods as $item)
                                <tr>
                                    <td class="am-text-left">
                                        <img class="am-block am-fl am-margin-left-0 am-margin-right-sm" src="{{str_first($item->goods_img)}}">
                                        <div class="am-line2 am-padding-top-sm">{{$item->goods_name}}</div>
                                    </td>
                                    <td><em class="am-padding-left-xs">
                                            {{$item->goods_spec}}
                                        </em>
                                    </td>
                                    <td>{{number_format($item->price,2)}}元</td>
                                    <td>{{$item->number}}</td>
                                    <td class="am-text-danger">
                                        {{$item->pay_money}}元
                                    </td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                    </div>
                    <div class="am-padding-top am-g am-bg-white">

                        <div class="am-u-md-3 am-u-lg-3 am-padding-0">&nbsp;&nbsp;</div>
                        <div class="am-u-md-3 am-u-lg-3 am-padding-left-0 am-text-right">
                            <dl class="am-padding-top-sm am-padding-bottom-sm am-ubb">
                                <dt>商品合计：<i class="am-margin-left-xl am-inline-block" style="width: 7rem;">￥{{$info->goods_price}}元</i></dt>
                                <dd>运费：<i class="am-margin-left-xl am-inline-block" style="width: 7rem;">￥{{$info->post_cost}}元</i></dd>
                            </dl>
                            <dl class="am-padding-top-sm am-padding-bottom-sm">
                                <dt>应付总额：<i class="am-text-danger am-margin-left-xl am-inline-block" style="width: 7rem;">￥{{$info->pay_price}}元</i></dt>
                            </dl>
                        </div>
                    </div>
                @else
                    @slot('info') 暂时没有订单详情 @endslot
                @endif
            </div>
        </div>
    </section>
@endsection
@push('scripts')

@endpush